package pe.com.hermes.hermetic.negocio.ultil;

import pe.com.hermes.hermetic.beans.PedidoAjaxBean;

import java.util.Collection;
import java.util.Vector;

import net.sf.jasperreports.engine.JRDataSource;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.
  JRAbstractBeanDataSourceProvider;
import net.sf.jasperreports.engine.data.
  JRBeanArrayDataSource;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;

public class CustomDataSourceProvider {



    public JRDataSource createBeanCollectionDatasource() {
        return new JRBeanCollectionDataSource(createBeanCollection());
    }

    @SuppressWarnings("unchecked")
    public static Collection createBeanCollection() {
        return PedidoAjaxBeanFactory.getBeanCollection();
    }

}